#include "comm.h"
using namespace std;

int main()
{
    int fd = open(FILENAME,O_WRONLY);
    if(fd < 0)
    {
         cerr << "errno: " << errno << ",cerrstring : "<< strerror(errno)<<endl;
    }
    cout<< "open fifo success.....write"<<endl;
    string massage;
    while(true)
    {
        cout<< "Please Enter# ";
        getline(cin,massage);
        int n  = write(fd,massage.c_str(),massage.size());
    }
    close(fd);
    cout<< "colse fifo success.....write"<<endl;
    return 0;
}